#include "animal.h"

void catEat(void)
{
    printf("cat eat fish!\n");
}


ANIMAL cat={
    .name="cat",
    .age=10,
    .eat=catEat
};


ANIMAL *PutLink_cat(ANIMAL *head)
{
    ANIMAL *lost;
    lost=head;
    if(head==NULL)
    {
        head=&cat;
    }else {
        while (lost->next!=NULL) {
            lost=lost->next;
        }
        lost->next=&cat;
    }
    return head;

}

